import login from '../views/login.vue'
import notFound from '../views/404.vue'
import home from '../views/home.vue'
import user from '../views/user.vue'
import company from '../views/company.vue'
import news from '../views/news.vue'
import commodity from '../views/commodity.vue'
import commodityDetail from '../views/commodityDetail.vue'
import message from '../views/message.vue'
import contactNumber from '../views/contactNumber.vue'

let routes = [
    {
        path: '/login',
        component: login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: notFound,
        name: '',
        hidden: true
    },

    //{ path: '/main', component: Main },
    {
        path: '/',
        component: home,
        name: '功能',
        iconCls: 'el-icon-s-cooperation',//图标样式class
        children: [
            { path: '/user', component: user, name: '用户管理' },
            { path: '/company', component: company, name: '企业管理' },
            { path: '/news', component: news, name: '新闻列表' },
            { path: '/commodity', component: commodity, name: '商品列表' },
            { path: '/commodityDetail', component: commodityDetail, name: '商品操作',hidden: true },
            { path: '/message', component: message, name: '留言列表' },
            { path: '/contactNumber', component: contactNumber, name: '联系电话' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;
